API Documentation
Image.h
1 // Image.h
3 //
5 
6 namespace nkImages
7 {
13  class Image final : public ImageBase
14  {
15  public :
16 
20  Image () ;
39  Image (nkMemory::Buffer&& data, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize = 0, unsigned int rowByteSize = 0, unsigned int sliceByteSize = 0) ;
54  Image (nkMemory::Buffer&& data, unsigned int width, unsigned int height, unsigned int depth, unsigned int arraySize, unsigned int mips, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize = 0) ;
65  Image (nkMemory::Buffer&& data, nkMemory::BufferCast<ImageDescriptor>&& images, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize, bool alphaPremultiplied = false, bool cubeMap = false) ;
72  Image (const Image& other) ;
79  Image (Image&& other) ;
83  ~Image () ;
84 
85  // Data access
89  virtual unsigned char* getDataPtr () const override ;
93  virtual unsigned long long getDataByteSize () const override ;
97  virtual nkMemory::BufferView<> getDataBuffer () const override ;
101  const nkMemory::Buffer& getData () const ;
102 
103  // Operators
109  Image& operator= (const Image& other) ;
115  Image& operator= (Image&& other) ;
116  } ;
117 }
nkImages::Image::Image
Image(nkMemory::Buffer &&data)
nkImages::Image::getDataBuffer
virtual nkMemory::BufferView getDataBuffer() const override
nkMemory::BufferView
A view over data.
Definition: BufferView.h:18
nkImages::Image::getDataByteSize
virtual unsigned long long getDataByteSize() const override
nkImages::Image::Image
Image(nkMemory::Buffer &&data, unsigned int width, unsigned int height, unsigned int depth, unsigned int arraySize, unsigned int mips, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0)
nkImages::Image::operator=
Image & operator=(const Image &other)
nkImages::Image::Image
Image(nkMemory::Buffer &&data, nkMemory::BufferCast< ImageDescriptor > &&images, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize, bool alphaPremultiplied=false, bool cubeMap=false)
nkImages::Image::getData
const nkMemory::Buffer & getData() const
nkMemory::Buffer
A buffer holding binary data.
Definition: Buffer.h:32
nkImages::Image::~Image
~Image()
nkImages::ImageBase
Base for all image data classes.
Definition: ImageBase.h:19
nkImages
Encompasses all API of component NilkinsImages.
Definition: BmpEncoder.h:7
nkImages::Image::Image
Image(nkMemory::Buffer &&data, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0, unsigned int rowByteSize=0, unsigned int sliceByteSize=0)
nkImages::Image::Image
Image()
nkImages::Image::Image
Image(Image &&other)
nkImages::PIXEL_FORMAT
PIXEL_FORMAT
Lists formats for pixels.
Definition: PixelFormat.h:16
nkMemory::BufferCast
Holds a Buffer and make it easy to cast the binary data.
Definition: BufferCast.h:18
nkImages::Image::Image
Image(const Image &other)
nkImages::Image::getDataPtr
virtual unsigned char * getDataPtr() const override
nkImages::Image
Holds all information required for an image, with ownership over the data.
Definition: Image.h:14